const fs = require('fs')
const path = require('path')
function readdirectory(dir) {
	let files = fs.readdirSync(dir)
	files.forEach((item) => {
		let filepath1 = dir + '/' + item
		// let filepath1 = item
		let stat = fs.statSync(filepath1)
		if (stat.isFile()) {
			console.log(`${filepath1}`)
		} else {
			readdirectory(filepath1)
		}
	})
}

//要读取的目录
readdirectory('../day5')
// fs.readdir()
// npm i treer -g
// 统计一下出现了多少个文件夹和文件
